package com.healthtop.dao;

import com.healthtop.mapper.XsRoleMapper;
import com.healthtop.model.XsRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class XsRoleDao {

    @Autowired
    private XsRoleMapper xsRoleMapper;

    public XsRole selectXsRoleById(Long roleId) {
        return xsRoleMapper.selectByPrimaryKey(roleId);
    }

    public void insert(XsRole xsRole) {
        xsRoleMapper.insertSelective(xsRole);
    }

    public void update(XsRole xsRole) {
        xsRoleMapper.updateByPrimaryKeySelective(xsRole);
    }
}
